<script src="jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  
  jQuery('#getValue').click(function(){
    var className = $('#emailId').prop('class');    
    alert(className);
  });  
  
  $('#setValue').click(function(){
    $('#emailId').prop("type","password");    
  });

});
</script>

<input type="text" name="email" value="hello@example.com" class="txt" id="emailId">

<p>
  <span id="getValue">Click Here to get Value</span>
<p>

<p>
  <span id="setValue">Click Here to set Value</span>
<p>